#include "property.h"
#include "component.h"

Property::Property(const QString& name, const Type& type, Node* initExpr, bool readonly, const QString& update, const YYLTYPE& loc)
    : Node(loc), m_name(name), m_type(type), m_initExpr(initExpr), m_readonly(readonly), m_update(update)
{
}

Component* Property::component() const
{
    return dynamic_cast<Component*>(parentNode()->parentNode());
}
